home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / util / misc / GadMget1_95.lha / GadMget / AutoFTP.script next >
Text File  |  1995-05-28  |  2KB  |  63 lines

  1. ; Autoftp : A script to automatically ftp files from an Aminet archive site.
  2. ;
  3. ; Autoftp uses ncftp and AmiTCP to function, if you don't have both of these
  4. ; working, Autoftp won't be useful to you.
  5. ;
  6. ; Keywords accepted :  YES -- Download a new RECENT file, without asking user
  7. ;                       NO -- Don't download the new RECENT file
  8. ;              (otherwise) -- Display a requester asking whether to download
  9. ;                             the new RECENT file or not.
  10. ; THINGS TO CHANGE FOR YOUR SETUP
  11. ;
  12. ; 1) Make sure the EasyReq and UniqueFile commands are in your search 
  13. ;    path... c: is a good place for them.
  14. ; 2) Make sure GadMget is in your search path, or specify it's location
  15. ;    on the line where it is called, below
  16. ; 3) If you want to use a site other than ftp.netnet.net, search
  17. ;    and replace it with the name of your preferred site
  18. ; 4) Autoftp is currently configured to store the RECENT file in txt:, and
  19. ;    the downloads in dn:.  Assign these directories to where you want
  20. ;    the files kept, or change the references in the script.
  21. ;
  22. .bra {
  23. .ket }
  24. .key GETRECENT
  25. failat 25
  26.  
  27. stack 50000        ;ncftp can abort if it doesn't have plenty of stack!
  28.  
  29. if {GETRECENT} EQ "YES"
  30.     echo "1" > env:GadAnswer
  31. else
  32.     if {GETRECENT} EQ "NO"
  33.         echo "2" >env:GadAnswer
  34.     else
  35.         easyreq >env:GadAnswer "Do you want to download a new RECENT listing?" "GadMGet Script" "Yes|No|Cancel"
  36.     endif
  37. endif
  38.  
  39. if $GadAnswer eq 0
  40.     endcli
  41.     quit
  42. endif
  43.  
  44. if $GadAnswer eq 1
  45.   cd txt:            ;Change this to wherever you wish to keep RECENT
  46.   amitcp:bin/ncftp -r ftp.netnet.net:/pub/aminet/RECENT    ;Change this to your favorite FTP site
  47. endif
  48.  
  49. uniquefile t:AutoFTP.GetList >env:GETLISTFILE
  50.  
  51. ;You may need to specify the path to GadMGet here if it's not in your default path!
  52. gadmget txt:recent OUTPUT $GETLISTFILE NOSIMPLEPATHS KEEPGETSORT GETSORT Size
  53.  
  54. if not `list $GETLISTFILE lformat="%L"` eq "empty"
  55.     cd dn:        ;Change this to wherever you want to receive your new files
  56.     amitcp:bin/ncftp -r ftp.netnet.net:/pub/aminet/ <$GETLISTFILE    ;Change this site as well
  57. endif
  58.  
  59. delete env:GETLISTFILE QUIET
  60.  
  61. endcli
  62.